home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-03-09 | 1.7 KB | 61 lines | [TEXT/MPS ] |
- # This moves a Rez DITL item by the amount requested in the direction asked.
- # The cursor must be somewhere on the line containing the boundary Rectangle
- # Frank Alviani - Monday, January 26, 1987 2:17:29 PM
-
- set exit 0
- set dir "`request 'Direction <U>p|<D>own|<R>ight|<L>eft'`"
- exit if ({dir} == "") OR ({status} != 0)
- set amt "`request -d 10 'Amount to shift?'`"
- exit if ({amt} == "") OR ({status} != 0)
- find ¡0¡0 "{active}" #ensure we're @ start of line
- if {dir} =~ /≈[Uu]≈/ #UP
- begin
- find /∂{/Δ:Δ/,/ "{active}" #find top coord
- set t `catenate "{active}".§`
- set top `evaluate {t} - {amt}`
- replace § {top} "{active}"
- find /,[0-9]+,/Δ:Δ/,/ "{active}" #find bottom coord
- set t `catenate "{active}".§`
- set top `evaluate {t} - {amt}`
- replace § {top} "{active}"
- exit
- end
- end
- if {dir} =~ /≈[Dd]≈/ #DOWN
- begin
- find /∂{/Δ:Δ/,/ "{active}" #find top coord
- set t `catenate "{active}".§`
- set top `evaluate {t} + {amt}`
- replace § {top} "{active}"
- find /,[0-9]+,/Δ:Δ/,/ "{active}" #find bottom coord
- set t `catenate "{active}".§`
- set top `evaluate {t} + {amt}`
- replace § {top} "{active}"
- exit
- end
- end
- if {dir} =~ /≈[Ll]≈/ #LEFT
- begin
- find /∂{[0-9]+,/Δ:Δ/,/ "{active}" #find left coord
- set t `catenate "{active}".§`
- set top `evaluate {t} - {amt}`
- replace § {top} "{active}"
- find /,[0-9]+,/Δ:Δ/∂}/ "{active}" #find right coord
- set t `catenate "{active}".§`
- set top `evaluate {t} - {amt}`
- replace § {top} "{active}"
- end
- end
- if {dir} =~ /≈[Rr]≈/ #RIGHT
- begin
- find /∂{[0-9]+,/Δ:Δ/,/ "{active}" #find left coord
- set t `catenate "{active}".§`
- set top `evaluate {t} + {amt}`
- replace § {top} "{active}"
- find /,[0-9]+,/Δ:Δ/∂}/ "{active}" #find right coord
- set t `catenate "{active}".§`
- set top `evaluate {t} + {amt}`
- replace § {top} "{active}"
- end
- end
-